/**
 * 部门信息API
 */
import { createAPI, createFormAPI } from '@/utils/request'
// import { data } from 'autoprefixer'
//查询部门列表
export const list = data => createAPI('/company/department', 'get',data)
//新增部门信息
export const save = data => createAPI('/company/department', 'post', data)
//查询部门详情
export const detail = data => createAPI(`/company/department/${data.id}`, 'get',data)
//修改部门信息
export const update = data => createAPI(`/company/department/${data.id}`, 'put', data)
//删除部门信息
export const deleteById = data => createAPI(`/company/department/${data.id}`, 'delete',data)
//保存或更新部门
export const saveOrUpdate = data => { return data.id ? update(data) : save(data) };